PasteHandleIntoMovie
ThePasteHandleIntoMovie
function takes the contents of a specified handle, together with its type, and pastes it into a specified movie.
pascal OSErr PasteHandleIntoMovie (Handle h, OSType handleType, Movie theMovie, long flags, ComponentInstance userComp);
h
- Specifies the handle to be pasted into the movie indicated by the
handleType
parameter.handleType
- Indicates the data type of the handle specified in the
h
parameter.theMovie
- Specifies the destination movie for this operation. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).flags
- Specifies a constant that further refines conditions of the paste operation.
pasteInParallel
Changes the function so that it takes the contents of the specified handle along with its type and adds (rather than inserts) it to the specified movie in an operation analogous to that of theAddMovieSelection
function. This operation does not affect the duration of existing tracks. It does not necessarily create a new track; rather, it uses a piece of an existing track, if possible.userComp
- Specifies the component or an instance of the component that is to perform the conversion of the data into a QuickTime movie. If you want a particular movie import component to perform the conversion, you may pass the component or an instance of that component. Otherwise set this parameter to 0 to allow the Movie Toolbox to determine the appropriate component. If you pass in a component instance, it will be used by
PasteHandleIntoMovie
. This allows you to communicate directly with the component before using this function to establish any conversion parameters. If you pass in a component ID, an instance is created and closed within this function.DESCRIPTION
If the handle is set to 0,PasteHandleIntoMovie
searches the scrap for a field of the typehandleType
. If both theh
parameter and thehandleType
parameter arenil
,PasteHandleIntoMovie
uses the first available data from the scrap.If you are just pasting in data from the scrap, it is best to allow
PasteHandleIntoMovie
to retrieve the data from the scrap, rather than doing it yourself. In this way, the function is able to obtain supplemental data from the scrap, if necessary (for example,'styl'
resources for'TEXT'
).
PasteHandleIntoMovie
pastes into the current selection according to the
following rules:
- If the selection is empty (for example, duration = 0),
PasteHandleIntoMovie
adds the data with the appropriate duration.- If the selection is not empty, the data is added and then scaled to fit into the duration of the selection. The current selection is deleted, unless you set the
pasteInParallel
flag.